package com.rr.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author RR
 * @date 2021/3/27 14:46
 */
@RestController
public class LoadBalanceController {
    @Value("${server.port}")
    private String serverPort;

    @GetMapping("/payment/lb")
    public String port(){
        return serverPort;
    }

    @GetMapping("/payment/feignTimeout")
    public String timeoutTest() throws InterruptedException {
        Thread.sleep(3000);
        return serverPort;
    }
}
